--- 战斗单位
---
--- @class FightSkill
FightSkill = ClientFight.CreateClass("FightSkill")
local FightSkill = FightSkill

--- @public
--- @return FightSkill
function FightSkill:ctor(team, site)

    ---@type number

    self.uuid = 0;
    --技能modelID*/
    ---@type number

    self.skillId = 0;
    --skillType, skillUnlock配置表的 type, 表示 1 2 3 4技能*/
    ---@type number
    self.skillType = 0;

    --攻击范围形状(圆形)*/
    ---@type number
    self. attackRadius = 0;
    --攻击范围形状(矩形)*/
    ---@type Rectangle2
    self.attackShape = nil

    --伤害形状*/
    ---@type Rectangle2
    self.damageShape = nil

    ---@type T_skillBean
    self.skillBean = {};
    ---@type table
    self.skillShowBean = {};
    -- 被强制修改了 目标选择规则 , 那就用这个 规则 替换skill 原有规则*/
    ---@type BuffSetSkillRuleSelector
    self.ruleSelectorByBuff = nil;

    --[[
    * 使用 AttackUtils.getAttackRadius()
    */]]


    --[[
    * 使用 AttackUtils.getAttackShape()
    */]]

    ---@type table<number,boolean>
    self.fighterSelectStates = {};
end
function FightSkill:getTargetRule()
    if self.ruleSelectorByBuff ~= nil then
        return self.ruleSelectorByBuff.selector:GetId()
    end
    return self.skillBean.f_TargetRule;
end

function FightSkill:getTargetRuleParam()
    if self.ruleSelectorByBuff ~= nil then
        return self.ruleSelectorByBuff.targetRuleParam
        ;
    end
    return nil;
end
function FightSkill:getAttackRadius()
    return self.attackRadius;
end
---@return Rectangle2
function FightSkill:getAttackShape()
    return self.attackShape;
end

function FightSkill:getTargetRuleParam(fighter)
    if (self.ruleSelectorByBuff ~= nil) then
        return self.ruleSelectorByBuff.targetRuleParam;
    end
    if (fighter.heroBean.f_HeroID == 610) then
        return { FighterSignEnum.TAG_999 };
    end
    return nil;
end